/**
 * @file comment-detail
 * @author yangmeng12
 */
/* global Page, swan, getApp */

/* eslint-disable babel/new-cap */
Page({
/* eslint-disable babel/new-cap */
    data: {
        srid: '',
        commentParam: {
            // 模拟数据，使用时请替换真实数据
            snid: 'BD20200202',
            path: '/one-stop-interaction/comment-detail/comment-detail?snid=BD20200202',
            title: '测试文章标题'
        }
    },
    onLoad(options) {
        if (options) {
            this.setData({
                srid: options.srid
            });
        }

        // 从globalData中去获取commentParam
        const param = getApp().globalData.commentParam;
        if (param && Object.keys(param).length) {
            this.setData({
                commentParam: param
            });
        }
    },
    detailDelete(e) {
        console.log(e);
    }
});